3.2.54 \(\int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx\) [154]

Optimal. Leaf size=98 \[ -\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\frac {2^{-\frac {1}{2}+n} n \, _2F_1\left (\frac {1}{2},\frac {3}{2}-n;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d} \]

[Out]

-cot(d*x+c)*(a+a*sec(d*x+c))^n/d+2^(-1/2+n)*n*hypergeom([1/2, 3/2-n],[3/2],1/2-1/2*sec(d*x+c))*(1+sec(d*x+c))^
(-1/2-n)*(a+a*sec(d*x+c))^n*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3960, 3913, 3912, 71} \begin {gather*} \frac {2^{n-\frac {1}{2}} n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac {1}{2}} (a \sec (c+d x)+a)^n \, _2F_1\left (\frac {1}{2},\frac {3}{2}-n;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x))\right )}{d}-\frac {\cot (c+d x) (a \sec (c+d x)+a)^n}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2*(a + a*Sec[c + d*x])^n,x]

[Out]

-((Cot[c + d*x]*(a + a*Sec[c + d*x])^n)/d) + (2^(-1/2 + n)*n*Hypergeometric2F1[1/2, 3/2 - n, 3/2, (1 - Sec[c +
 d*x])/2]*(1 + Sec[c + d*x])^(-1/2 - n)*(a + a*Sec[c + d*x])^n*Tan[c + d*x])/d

Rule 71

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c
 - a*d))^n))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}
, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] ||  !(Ra
tionalQ[n] && GtQ[-d/(b*c - a*d), 0]))

Rule 3912

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Dist[a^2*d
*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])), Subst[Int[(d*x)^(n - 1)*((a + b*x)^(m -
 1/2)/Sqrt[a - b*x]), x], x, Csc[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] &&  !In
tegerQ[m] && GtQ[a, 0]

Rule 3913

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Dist[a^Int
Part[m]*((a + b*Csc[e + f*x])^FracPart[m]/(1 + (b/a)*Csc[e + f*x])^FracPart[m]), Int[(1 + (b/a)*Csc[e + f*x])^
m*(d*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] &&  !IntegerQ[m] &&  !GtQ
[a, 0]

Rule 3960

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)/cos[(e_.) + (f_.)*(x_)]^2, x_Symbol] :> Simp[Tan[e + f*x]*((a
+ b*Csc[e + f*x])^m/f), x] + Dist[b*m, Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e
, f, m}, x]

Rubi steps

\begin {align*} \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx &=-\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+(a n) \int \sec (c+d x) (a+a \sec (c+d x))^{-1+n} \, dx\\ &=-\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\left (n (1+\sec (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int \sec (c+d x) (1+\sec (c+d x))^{-1+n} \, dx\\ &=-\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}-\frac {\left (n (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)\right ) \text {Subst}\left (\int \frac {(1+x)^{-\frac {3}{2}+n}}{\sqrt {1-x}} \, dx,x,\sec (c+d x)\right )}{d \sqrt {1-\sec (c+d x)}}\\ &=-\frac {\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\frac {2^{-\frac {1}{2}+n} n \, _2F_1\left (\frac {1}{2},\frac {3}{2}-n;\frac {3}{2};\frac {1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac {1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.80, size = 142, normalized size = 1.45 \begin {gather*} -\frac {2^{-1+n} \left (\cot ^2\left (\frac {1}{2} (c+d x)\right ) \, _2F_1\left (-\frac {1}{2},n;\frac {1}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )-\, _2F_1\left (\frac {1}{2},n;\frac {3}{2};\tan ^2\left (\frac {1}{2} (c+d x)\right )\right )\right ) \left (\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )\right )^n \left (\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)\right )^n (1+\sec (c+d x))^{-n} (a (1+\sec (c+d x)))^n \tan \left (\frac {1}{2} (c+d x)\right )}{d} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[Csc[c + d*x]^2*(a + a*Sec[c + d*x])^n,x]

[Out]

-((2^(-1 + n)*(Cot[(c + d*x)/2]^2*Hypergeometric2F1[-1/2, n, 1/2, Tan[(c + d*x)/2]^2] - Hypergeometric2F1[1/2,
 n, 3/2, Tan[(c + d*x)/2]^2])*(Cos[c + d*x]*Sec[(c + d*x)/2]^2)^n*(Cos[(c + d*x)/2]^2*Sec[c + d*x])^n*(a*(1 +
Sec[c + d*x]))^n*Tan[(c + d*x)/2])/(d*(1 + Sec[c + d*x])^n))

________________________________________________________________________________________

Maple [F]
time = 0.09, size = 0, normalized size = 0.00 \[\int \left (\csc ^{2}\left (d x +c \right )\right ) \left (a +a \sec \left (d x +c \right )\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2*(a+a*sec(d*x+c))^n,x)

[Out]

int(csc(d*x+c)^2*(a+a*sec(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+a*sec(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((a*sec(d*x + c) + a)^n*csc(d*x + c)^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+a*sec(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((a*sec(d*x + c) + a)^n*csc(d*x + c)^2, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{n} \csc ^{2}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2*(a+a*sec(d*x+c))**n,x)

[Out]

Integral((a*(sec(c + d*x) + 1))**n*csc(c + d*x)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2*(a+a*sec(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((a*sec(d*x + c) + a)^n*csc(d*x + c)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^n}{{\sin \left (c+d\,x\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(c + d*x))^n/sin(c + d*x)^2,x)

[Out]

int((a + a/cos(c + d*x))^n/sin(c + d*x)^2, x)

________________________________________________________________________________________